<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/ca_ee_update/'.$cateid)?>">

	<h3>加拿大教育和就业细节表 Education and Employment</h3>
    <table width="100%">
    
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
		<tr class="even">
        	<td colspan="2">DATE
        		日期</td>
        	<td rowspan="2">NAME &amp; ADDRESS OF SCHOOL<br />
        		学校的名称及地址</td>
			<td rowspan="2">DIPLOMA/ DEGREE<br />
				学历/学位</td>
			<td rowspan="2">TYPE OF COURSE<br />
				课程类别</td>
        </tr>
        <tr class="even">
        	<td>FROM从</td>
        	<td>TO到</td>
        	</tr>
		<tr class="odd">
        	<td><input type="text" name="edu1_from" value="<?= @$info->edu1_from?>"/></td>
        	<td><input type="text" name="edu1_to" value="<?= @$info->edu1_to?>" /></td>
        	<td><textarea name="edu1_school" style="width: 180px; height:30px"><?= @$info->edu1_school?></textarea></td>
			<td><input type="text" name="edu1_degree" value="<?= @$info->edu1_degree?>" /></td>
			<td><input type="text" name="edu1_course" value="<?= @$info->edu1_course?>" /></td>
        </tr>
        <tr class="even">
        	<td><input type="text" name="edu2_from" value="<?= @$info->edu2_from?>" /></td>
        	<td><input type="text" name="edu2_to" value="<?= @$info->edu2_to?>" /></td>
        	<td><textarea name="edu2_school" style="width: 180px; height:30px"><?= @$info->edu2_school?></textarea></td>
			<td><input type="text" name="edu2_degree" value="<?= @$info->edu2_degree?>" /></td>
			<td><input type="text" name="edu2_course" value="<?= @$info->edu2_course?>" /></td>
        </tr>
		<tr class="odd">
        	<td><input type="text" name="edu3_from" value="<?= @$info->edu3_from?>" /></td>
        	<td><input type="text" name="edu3_to" value="<?= @$info->edu3_to?>" /></td>
        	<td><textarea name="edu3_school" style="width: 180px; height:30px"><?= @$info->edu3_school?></textarea></td>
			<td><input type="text" name="edu3_degree" value="<?= @$info->edu3_degree?>" /></td>
			<td><input type="text" name="edu3_course" value="<?= @$info->edu3_course?>" /></td>
        </tr>
        <tr class="even">
        	<td colspan="5">&nbsp;</td>
        	</tr>
		<tr class="odd">
        	<td>FROM从</td>
        	<td>TO到</td>
        	<td>NAME &amp; ADDRESS OF WORK UNIT/COMPANY<br />
        		单位/公司的名称及地址</td>
			<td>POSITION<br />
				职位</td>
			<td>TYPE OF BUSINESS<br />
				业务类别</td>
        </tr>
        <tr class="even">
        	<td><input type="text" name="com1_from" value="<?= @$info->com1_from?>" /></td>
        	<td><input type="text" name="com1_to" value="<?= @$info->com1_to?>" /></td>
        	<td><textarea name="com1_name" style="width: 180px; height:30px"><?= @$info->com1_name?></textarea></td>
			<td><input type="text" name="com1_position" value="<?= @$info->com1_position?>" /></td>
			<td><input type="text" name="com1_business" value="<?= @$info->com1_business?>" /></td>
        </tr>
		<tr class="odd">
        	<td><input type="text" name="com2_from" value="<?= @$info->com2_from?>" /></td>
        	<td><input type="text" name="com2_to" value="<?= @$info->com2_to?>" /></td>
        	<td><textarea name="com2_name" style="width: 180px; height:30px"><?= @$info->com2_name?></textarea></td>
			<td><input type="text" name="com2_position" value="<?= @$info->com2_position?>" /></td>
			<td><input type="text" name="com2_business" value="<?= @$info->com2_business?>" /></td>
        </tr>
        <tr class="even">
        	<td><input type="text" name="com3_from" value="<?= @$info->com3_from?>" /></td>
        	<td><input type="text" name="com3_to" value="<?= @$info->com3_to?>" /></td>
        	<td><textarea name="com3_name" style="width: 180px; height:30px"><?= @$info->com3_name?></textarea></td>
			<td><input type="text" name="com3_position" value="<?= @$info->com3_position?>" /></td>
			<td><input type="text" name="com3_business" value="<?= @$info->com3_business?>" /></td>
        </tr>
		<tr class="odd">
        	<td><input type="text" name="com4_from" value="<?= @$info->com4_from?>" /></td>
        	<td><input type="text" name="com4_to" value="<?= @$info->com4_to?>" /></td>
        	<td><textarea name="com4_name" style="width: 180px; height:30px"><?= @$info->com4_name?></textarea></td>
			<td><input type="text" name="com4_position" value="<?= @$info->com4_position?>" /></td>
			<td><input type="text" name="com4_business" value="<?= @$info->com4_business?>" /></td>
        </tr>
        <tr class="even">
        	<td colspan="5">&nbsp;</td>
        	</tr>
		<tr class="odd">
        	<td colspan="5">Is this your first time travelling outside of China? If no, please provide a summary of your travel history for the past five years including countries travelled to and dates of travel.<br />
        		此次是否是你的第一次出境旅行？若不是，请提供过去五年中所有出境旅行概况、包括目的地国家及旅行起始日期。</td>
        	</tr>
        <tr class="even">
        	<td colspan="5"><textarea name="travel_detail"><?= @$info->travel_detail?></textarea></td>
        	</tr>
		<tr class="odd">
        	<td colspan="5">&nbsp;</td>
        	</tr>
        <tr class="even">
        	<td colspan="5">If you are a member of a business delegation, can you confirm the identity and stated profession of those travelling with you? If no, please provide an explanation:<br />
        		如果你是某商务团组之成员，你是否能确认与你同行人士的身份及职业？若不能，请提供解释：</td>
        	</tr>
		<tr class="odd">
        	<td colspan="5"><textarea name="business_detail"><?= @$info->business_detail?></textarea></td>
        	</tr>
        <tr class="even">
        	<td colspan="5">&nbsp;</td>
        	</tr>
		<tr class="odd">
        	<td colspan="5">
			Date （日期）<input type="text" name="sign_date" id="sign_date" value="<?= @$info->sign_date?>" />
			</td>
        </tr>
		<tr class="odd">
        	<td colspan="5">
			Print Name in Pinyin （印刷体拼音姓名）<input type="text" name="sign_pinyin" value="<?= @$info->sign_pinyin?>" />
			</td>
        </tr>
		<tr class="odd">
        	<td colspan="5">
			Signature of Applicant in Chinese （申请人签字）<input type="text" name="sign_name" value="<?= @$info->sign_name?>" />
			</td>
        </tr>
		<tr class="odd">
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
        <tr class="even">
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
        	<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		sign_date:"required",
		sign_pinyin:{
		 required:true,
		 rangelength:[2,50]
		}
	}
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'yy-mm-dd',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);
	
	$("#sign_date").datepicker();
	
	
	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>